<?php

namespace Ue\ErpBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * StockItem
 *
 * @ORM\Table(name="ue_stock_item", indexes={@ORM\Index(name="ue_stock_item_order_id_idx", columns={"product_id"}), @ORM\Index(name="ue_stock_item_position_id_idx", columns={"position_id"}), @ORM\Index(name="ue_stock_item_stock_in_id_idx", columns={"stock_in_id"}), @ORM\Index(name="ue_stock_item_warehouse_id_idx", columns={"warehouse_id"})})
 * @ORM\Entity
 */
class StockItem
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="production_date", type="date", nullable=true)
     */
    private $productionDate;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="created_at", type="datetime", nullable=false)
     */
    private $createdAt;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="updated_at", type="datetime", nullable=false)
     */
    private $updatedAt;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="valid_date", type="date", nullable=true)
     */
    private $validDate;

    /**
     * @var \WarehousePosition
     *
     * @ORM\ManyToOne(targetEntity="WarehousePosition")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="position_id", referencedColumnName="id")
     * })
     */
    private $position;

    /**
     * @var \Product
     *
     * @ORM\ManyToOne(targetEntity="Product")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="product_id", referencedColumnName="id")
     * })
     */
    private $product;

    /**
     * @var \StockIn
     *
     * @ORM\ManyToOne(targetEntity="StockIn")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="stock_in_id", referencedColumnName="id")
     * })
     */
    private $stockIn;

    /**
     * @var \Warehouse
     *
     * @ORM\ManyToOne(targetEntity="Warehouse")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="warehouse_id", referencedColumnName="id")
     * })
     */
    private $warehouse;



    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set productionDate
     *
     * @param \DateTime $productionDate
     * @return StockItem
     */
    public function setProductionDate($productionDate)
    {
        $this->productionDate = $productionDate;

        return $this;
    }

    /**
     * Get productionDate
     *
     * @return \DateTime 
     */
    public function getProductionDate()
    {
        return $this->productionDate;
    }

    /**
     * Set createdAt
     *
     * @param \DateTime $createdAt
     * @return StockItem
     */
    public function setCreatedAt($createdAt)
    {
        $this->createdAt = $createdAt;

        return $this;
    }

    /**
     * Get createdAt
     *
     * @return \DateTime 
     */
    public function getCreatedAt()
    {
        return $this->createdAt;
    }

    /**
     * Set updatedAt
     *
     * @param \DateTime $updatedAt
     * @return StockItem
     */
    public function setUpdatedAt($updatedAt)
    {
        $this->updatedAt = $updatedAt;

        return $this;
    }

    /**
     * Get updatedAt
     *
     * @return \DateTime 
     */
    public function getUpdatedAt()
    {
        return $this->updatedAt;
    }

    /**
     * Set validDate
     *
     * @param \DateTime $validDate
     * @return StockItem
     */
    public function setValidDate($validDate)
    {
        $this->validDate = $validDate;

        return $this;
    }

    /**
     * Get validDate
     *
     * @return \DateTime 
     */
    public function getValidDate()
    {
        return $this->validDate;
    }

    /**
     * Set position
     *
     * @param \Ue\ErpBundle\Entity\WarehousePosition $position
     * @return StockItem
     */
    public function setPosition(\Ue\ErpBundle\Entity\WarehousePosition $position = null)
    {
        $this->position = $position;

        return $this;
    }

    /**
     * Get position
     *
     * @return \Ue\ErpBundle\Entity\WarehousePosition 
     */
    public function getPosition()
    {
        return $this->position;
    }

    /**
     * Set product
     *
     * @param \Ue\ErpBundle\Entity\Product $product
     * @return StockItem
     */
    public function setProduct(\Ue\ErpBundle\Entity\Product $product = null)
    {
        $this->product = $product;

        return $this;
    }

    /**
     * Get product
     *
     * @return \Ue\ErpBundle\Entity\Product 
     */
    public function getProduct()
    {
        return $this->product;
    }

    /**
     * Set stockIn
     *
     * @param \Ue\ErpBundle\Entity\StockIn $stockIn
     * @return StockItem
     */
    public function setStockIn(\Ue\ErpBundle\Entity\StockIn $stockIn = null)
    {
        $this->stockIn = $stockIn;

        return $this;
    }

    /**
     * Get stockIn
     *
     * @return \Ue\ErpBundle\Entity\StockIn 
     */
    public function getStockIn()
    {
        return $this->stockIn;
    }

    /**
     * Set warehouse
     *
     * @param \Ue\ErpBundle\Entity\Warehouse $warehouse
     * @return StockItem
     */
    public function setWarehouse(\Ue\ErpBundle\Entity\Warehouse $warehouse = null)
    {
        $this->warehouse = $warehouse;

        return $this;
    }

    /**
     * Get warehouse
     *
     * @return \Ue\ErpBundle\Entity\Warehouse 
     */
    public function getWarehouse()
    {
        return $this->warehouse;
    }
}
